 /* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#import <Foundation/Foundation.h>
#import <JDCloudOCSDKSop/SopModel.h>

@implementation VerifySecurityTokenInfo
-(id) initWithAction:(NSString*) action { 
     self.action = action;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.action = [dictionary objectForKey:@"action"];
    return self;
}
 @end
@implementation VerificationCodeInfo
-(id) initWithAction:(NSString*) action
      type:(NSNumber*)type { 
     self.action = action;               
     self.type = type;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.action = [dictionary objectForKey:@"action"];
    self.type = [dictionary objectForKey:@"type"];
    return self;
}
 @end
@implementation GetSecurityTokenInfo
-(id) initWithType:(NSNumber*) type
      code:(NSString*)code
      action:(NSString*)action
      durationSeconds:(NSNumber*)durationSeconds { 
     self.type = type;               
     self.code = code;               
     self.action = action;               
     self.durationSeconds = durationSeconds;               
    return self;
}

-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self type])
    {
        [result setValue:[self type] forKey:@"type"];
    }
    if([self code])
    {
        [result setValue:[self code] forKey:@"code"];
    }
    if([self action])
    {
        [result setValue:[self action] forKey:@"action"];
    }
    if([self durationSeconds])
    {
        [result setValue:[self durationSeconds] forKey:@"durationSeconds"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.type = [dictionary objectForKey:@"type"];
    self.code = [dictionary objectForKey:@"code"];
    self.action = [dictionary objectForKey:@"action"];
    self.durationSeconds = [dictionary objectForKey:@"durationSeconds"];
    return self;
}
 @end
 
 


